<?php

namespace App\Providers;

use Rootwork\Phalcon\Session\Adapter\Jwt;
/**
 * \App\Providers\SessionServiceProvider
 *
 * @package App\Providers
 */
class SessionServiceProvider extends AbstractServiceProvider
{
    /**
     * The Service name.
     * @var string
     */
    protected $serviceName = 'session';
	
    /**
     * Register application service.
     *
     * @return void
     */
    public function register()
    {
        $this->di->setShared(
            $this->serviceName,
            function () {
                $session = new Jwt(['key' => 'oksdkjsodkfjslfkjlaskdf','lifetime'=>60*60*24*180]);
				$session->start();
                return $session;
            }
        );
    }
}
